﻿<Application 
	x:Class="DiscoveryLogic.Workflows.Monitor.Avalon.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:PatientHelper="clr-namespace:DiscoveryLogic.Workflows.Monitor.Avalon.PatientHelper"
	Startup="ApplicationStartingUp"><!--StartupUri="MainWindow.xaml"-->
    <Application.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="Resources\BrandingVisualsResourceDictionary.xaml"/>
				<ResourceDictionary Source="Resources\Shared.xaml"/>
				<ResourceDictionary Source="Resources\ScrollBarStyle.xaml"/>
				<ResourceDictionary Source="Resources\PatientDetailExpanderDictionary.xaml"/>
				<ResourceDictionary Source="Resources\ChartsResourceDictionary.xaml"/>
				<ResourceDictionary Source="Resources\PatientRosterListResourceDictionary.xaml"/>
				<ResourceDictionary Source="Resources\ButtonStyle.xaml"/>
				<ResourceDictionary Source="Resources\ChartResources.xaml"/>
				<ResourceDictionary Source="Resources\ChartRotator.xaml"/>
			</ResourceDictionary.MergedDictionaries>

			<XmlDataProvider x:Key="HealthDataXML" Source="XML/TestData.xml" XPath="/healthFirst" />
			<XmlDataProvider x:Key="WLHealthDataXML" Source="XML/WLTestData.xml" XPath="/healthFirst" />
			<ObjectDataProvider x:Key="SearchDataResults" ObjectType="{x:Type PatientHelper:SearchData}" />

			<!-- DateTimeBinding -->
			<ObjectDataProvider x:Key="DateTimeSource" ObjectType="{x:Type PatientHelper:DateTimeBinding}" />

			<Style x:Key="LooklessListBox" TargetType="{x:Type ListBox}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ListBox}">
							<ScrollViewer ClipToBounds="False" x:Name="scrollViewer">
								<StackPanel Orientation="Vertical" IsItemsHost="True"  ClipToBounds="False" />
							</ScrollViewer>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<Style x:Key="LooklessWrappingListBox" TargetType="{x:Type ListBox}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ListBox}">
							<ScrollViewer HorizontalScrollBarVisibility="Disabled">
								<WrapPanel IsItemsHost="True" />
							</ScrollViewer>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<Style x:Key="LooklessButton" TargetType="{x:Type Button}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<Grid  Background="transparent" Cursor="Hand">
								<ContentPresenter VerticalAlignment="{TemplateBinding Property=VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding Property=HorizontalContentAlignment}" />
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<Style x:Key="LooklessButtonWithHover" TargetType="{x:Type Button}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<Grid x:Name="RootGrid"   Background="transparent" Cursor="Hand" Opacity="0.5">
								<ContentPresenter VerticalAlignment="{TemplateBinding Property=VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding Property=HorizontalContentAlignment}" />
							</Grid>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="True">
									<Setter Property="Opacity" Value="1" TargetName="RootGrid" />
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

			<ControlTemplate x:Key="OSCheckerContentControlTemplate" TargetType="{x:Type ContentControl}">
				<Grid x:Name="RootGrid">
					<ContentPresenter x:Name="ContentSite" />
				</Grid>
				<ControlTemplate.Triggers>
					<Trigger Property="PatientHelper:OSChecker.Version" Value="WindowsXP">
						<Setter TargetName="RootGrid" Property="Background" Value="#999999"/>
						<Setter TargetName="ContentSite" Property="Margin" Value="5" />
					</Trigger>
					<Trigger Property="PatientHelper:OSChecker.Version" Value="WindowsVista">
						<Setter TargetName="RootGrid" Property="Background" Value="Transparent"/>
						<Setter TargetName="ContentSite" Property="Margin" Value="0" />
					</Trigger>
				</ControlTemplate.Triggers>
			</ControlTemplate>

		</ResourceDictionary>
	</Application.Resources>
</Application>
